package org.xiaoyu.rpc.remoting.packet;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * Created By Have
 * 2021/7/12 16:40
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Result implements Serializable {
    private Object value;
    private Throwable exception;

    public boolean hasException() {
        return exception != null;
    }
}
